package com.ht.power3d.vmap;

import cern.colt.matrix.impl.SparseDoubleMatrix1D;
import cern.colt.matrix.DoubleMatrix1D;

/**
 * @author SU Xinyi
 * @since 2009-5-26
 */
public class TestColt {
    public static void main(String[] args) {
        System.out.println("freeMemory:"+Runtime.getRuntime().freeMemory()/(1024*1024)+"MB");
        System.out.println("totalMemory:"+Runtime.getRuntime().totalMemory()/(1024*1024)+"MB");
        System.out.println("usedMemory:"+(Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory())/(1024*1024)+"MB");

        for(int i=0; i<25000; i++){
            DoubleMatrix1D vec = new SparseDoubleMatrix1D(128);
        }

        System.out.println("freeMemory:"+Runtime.getRuntime().freeMemory()/(1024*1024)+"MB");
        System.out.println("totalMemory:"+Runtime.getRuntime().totalMemory()/(1024*1024)+"MB");
        System.out.println("usedMemory:"+(Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory())/(1024*1024)+"MB");

    }
}
